package com.tianshi.order.service;

import com.tianshi.entity.Orders;

import java.util.List;


public interface OrderService {
    /**
     * 查询订单
     * @return
     */
    List<Orders> checkOrders();

    /**
     *
     * @param orderId
     * @return
     */
    String cancelByOrderSn(Long orderId);

    /**
     * 确认订单
     * @param orderId
     * @return
     */
    String confirmByOrderId(Long orderId);

    /**
     * 根据订单号查询订单
     * @param cartId
     * @return
     */
    List<Orders> checkOrderById(Long cartId);

    int addOrder(Long cartId);

    List<Orders> checkOrderByUserId(Long userId);


    /*
     * 立即购买
     * */
    Integer buyOne(Long productId,Long userId);
}
